package chapter02;

public class Example21 {
    public static void main(String[] args) {
        int sum1 = add(1,2);
        int sum2 = add(1,2,3);
        double sum3 =add(1.2,2.3);
        System.out.println("sum1"+sum1);
        System.out.println("sum2"+sum2);
        System.out.println("sum3"+sum3);
    }
    public static int add(int x, int y){
        return x+y;
    }
    public  static  int add(int x, int y, int z){
        return x+y+z;
    }
    public static double add(double x, double y){
        return x+y;
    }
}
